import request from '@/utils/request'
import { faceApiUrl } from '../config'

/**
 * 添加预警
 * @param parameter
 */
export function insertSelective(data) {
    return request({
        url: faceApiUrl + '/projectCycleEarlyWarn/insertSelective',
        method: 'post',
        data: data
    })
}

/**
 * 预警list查询
 * @param parameter
 */
export function getPageProjectCycleEarlyWarn(data) {
    return request({
        url: faceApiUrl + '/projectCycleEarlyWarn/getPageProjectCycleEarlyWarn',
        method: 'post',
        data: data
    })
}


/**
 * 填写拟采取措施
 * @param parameter
 */
export function fillMeasure(data) {
    return request({
        url: faceApiUrl + '/projectCycleEarlyWarn/fillMeasure',
        method: 'post',
        data: data
    })
}

/**
 * 预警详情
 * @param parameter
 */
export function getProjectCycleEarlyWarnById(data) {
    return request({
        url: faceApiUrl + '/projectCycleEarlyWarn/getProjectCycleEarlyWarnById',
        method: 'get',
        params: data
    })
}

/**
 * 根据项目id查询最新一条工期预警信息
 * @param parameter
 */
export function getProjectCycleEarlyWarnByProjectId(data) {
    return request({
        url: faceApiUrl + '/projectCycleEarlyWarn/getProjectCycleEarlyWarnByProjectId',
        method: 'get',
        params: data
    })
}

/**
 * 查询填写验收记录数据
 * @param parameter
 */
export function queryProjectCycleEarlyWarnRecord(data) {
    return request({
        url: faceApiUrl + '/projectCycleEarlyWarn/queryProjectCycleEarlyWarnRecord',
        method: 'get',
        params: data
    })
}

/**
 * 填写验收记录对象
 * @param parameter
 */
export function insertRecord(data) {
    return request({
        url: faceApiUrl + '/projectCycleEarlyWarn/insertRecord',
        method: 'post',
        data: data
    })
}


/**
 * 填写验收记录（审批流程）
 * @param parameter
 */
export function insertRecordProcess(data) {
    return request({
        url: faceApiUrl + '/projectCycleEarlyWarn/insertRecordProcess',
        method: 'post',
        data: data
    })
}